/*
 * @Description:
 * @Author: 胡涛
 * @Date: 2023-09-07 00:24:53
 * @LastEditors: 胡涛
 * @LastEditTime: 2023-09-14 23:56:02
 */
import api from "@/api";
import {
  AppConfigurationDto,
  PermissionDefinitionDto,
  SystemMenuDto,
} from "./types";

export default {
  /**
   * 获取全局配置数据
   * @returns
   */
  getConfiguration(): Promise<AppConfigurationDto> {
    return api.get("/api/Platform/configuration");
  },
  /**
   * 获取权限定义
   * @returns
   */
  getPermissionDeninitions(): Promise<Array<PermissionDefinitionDto>> {
    return api.get("/api/Platform/configuration/permissionDefinitions");
  },
  /**
   * 获取菜单数据项
   * @returns
   */
  getMenuItems(): Promise<Array<SystemMenuDto>> {
    return api.get("/api/Platform/configuration/menuItems");
  },
};
